<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="/admin/lib/html5shiv.js"></script>
<script type="text/javascript" src="/admin/lib/respond.min.js"></script>
<![endif]-->
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui/css/H-ui.css" />
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
<script type="text/javascript" src="/admin/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <style>
        .input-ip{
            -webkit-appearance: auto!important;
            text-align: center;
            width: 100px;
        }
        #passedcard_remote_ip-error{
            left: 91px;
            top: -16px;
        }
    </style>
    <title></title>

</head>

<body>
    <article class="page-container">
        <form class="form form-horizontal" id="form" autocomplete="off" >
            <div class="row cl">
                <label class="form-label col-sm-3">合格证的检测公司名称：</label>
                <div class="formControls col-sm-9">
                    <input type="text" class="input-text" value="{{ $data->name_pass }}" placeholder="" name="name_pass">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-sm-3">合格证的检测公司名称位置：</label>
                <div class="formControls col-sm-9">
                    <input type="text" class="input-text" value="{{ $data->passedcard_company_name_pos }}" placeholder="" name="passedcard_company_name_pos">
                    <label style="color: #999!important;">公司名称距左边沿的距离，单位：dot，12dot = 1mm</label>
                </div>
            </div>
{{--            @if(config('constant.app_name') === 'SiChuanDeYang')--}}
{{--            <div class="row cl">--}}
{{--                <label class="form-label col-sm-3">合格证的打印样式：</label>--}}
{{--                <div class="formControls col-sm-9">--}}
{{--                    <span class="select-box" style="width: 150px">--}}
{{--                        <select class="select" size="1" name="print_passedCard_style">--}}
{{--                            @php $style = DB::table('setting_sys')->where('key','print_passedCard_style')->value('value'); @endphp--}}
{{--                            @foreach (['样式一','样式二','样式三'] as $K=> $item)--}}
{{--                                <option value="{{$K + 1}}"--}}
{{--                                        @if (($K+1) == $style )--}}
{{--                                        selected--}}
{{--                                @endif >--}}
{{--                                {{$item}}--}}
{{--                                </option>--}}
{{--                            @endforeach--}}
{{--                        </select>--}}
{{--                    </span>--}}
{{--                    <label style="color: #999!important;">样式1：有二维码；   2：有说明；    3：无二维码，无说明。</label>--}}
{{--                </div>--}}
{{--            </div>--}}
{{--            @endif--}}
            <div class="row cl">
                <label class="form-label col-sm-3">合格证的打印深度：</label>
                <div class="formControls col-sm-9">
                    <span class="select-box" style="width: 70px">
                        <select class="select" size="1" name="passedcard_print_depth">
                            @foreach ([3,4,5,6,7,8,9,10,11,12,13,14,15] as $item)
                                <option value="{{$item}}"
                                @if ($item === $data->passedcard_print_depth )
                                    selected
                                @endif >
                                {{$item}}
                                </option>
                            @endforeach
                        </select>
                    </span>
                    <label style="color: #999!important;">默认值：12，数值越大打印越清晰，但数值过大会影响打印头寿命</label>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-sm-3">检测人员名称：</label>
                <div class="formControls col-sm-9 ">
                    <div class="radio-box">
                        <input type="radio" id="radio-1" name="passedcard_is_tester_code" value="0" @if ($data->passedcard_is_tester_code==0)checked @endif>
                        <label for="radio-1">真实姓名</label>
                      </div>
                      <div class="radio-box">
                        <input type="radio" id="radio-2" name="passedcard_is_tester_code" value="1" @if ($data->passedcard_is_tester_code==1)checked @endif>
                        <label for="radio-2">代号</label>
                      </div>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-sm-3">检测人员数量：</label>
                <div class="formControls col-sm-9 ">
                    <div class="radio-box">
                        <input type="radio" id="radio-3" name="passedcard_tester_count" value="1" @if ($data->passedcard_tester_count==1)checked @endif>
                        <label for="radio-3">1 人</label>
                      </div>
                      <div class="radio-box">
                        <input type="radio" id="radio-4" name="passedcard_tester_count" value="2" @if ($data->passedcard_tester_count==2)checked @endif>
                        <label for="radio-4">2 人</label>
                      </div>
                      <label style="color: #999!important;">合格证上的检测人员填写几个人</label>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-sm-3">打印方式：</label>
                <div class="formControls col-sm-9 ">
                    <div class="radio-box">
                        <input type="radio" id="radio-5" name="passedcard_is_remote_print" value="0" @if ($data->passedcard_is_remote_print==0)checked @endif>
                        <label for="radio-5">本机打印</label>
                        <label style="color: #999!important;margin-left:109px">只能用连接打印机的电脑打印</label>
                    </div>
                    <br>
                    <div class="radio-box">
                        <input type="radio" id="radio-6" name="passedcard_is_remote_print" value="1" @if ($data->passedcard_is_remote_print==1)checked @endif>
                        <label for="radio-6">远程打印</label>
                        <input type="text" class="input-ip" value="{{ $data->passedcard_remote_ip }}" placeholder="" name="passedcard_remote_ip">
                        <label style="color: #999!important;">与连接打印机的电脑在同一局域网即可打印</label>
                    </div>
                    <br><label style="color: rgb(216, 29, 29)!important;">选择远程打印时必须填写与打印机连接的电脑的IP地址<a href="https://jingyan.baidu.com/article/63f236287de2c70208ab3de4.html" target="_blank" class="btn btn-link">如何查看IP地址？</a></label>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-sm-3">打印二维码：</label>
                <div class="formControls col-sm-9 ">
                    <div class="">
                        <input type="checkbox" id="have_barcode" name="have_barcode" value="1" @if ($have_barcode==1)checked @endif>
                        <label for="have_barcode">开启</label>
                    </div>
                </div>
            </div>
            @csrf

            <div class="row cl pt-20">
                <div class="col-sm-9 col-sm-offset-3">
                    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
                </div>
            </div>
        </form>
    </article>

    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/admin/lib/layer/3.1.1/layer.js"></script>
    <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
    <!--/_footer 作为公共模版分离出去-->

    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/validate-methods.js?ver={{config('constant.static_res_ver')}}"></script>
    <script type="text/javascript" src="/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script type="text/javascript">
        $(function(){

            var index2;

            $("#form").validate({
                rules:{
                    passedcard_company_name_pos:{
                        required:true,
                        isPoInteger:true,
                        max:1000,
                    },
                    passedcard_remote_ip:{
                        ip:true,
                    },

                },
                // onkeyup:false,
                // focusCleanup:false,
                success:"valid",
                submitHandler:function(form){
                   $(form).ajaxSubmit({
                        type: 'post',
                        url: "",//自己提交给自己可以不写url
                        beforeSend : function () {
                            //0.4透明度 白色遮罩
                           index2 = layer.load(2,{ shade: [0.3,'#fff'] });
                        },
                        complete : function () {
                            layer.close(index2);
                        },
                        success: function(data) {
                            //判断添加结果
                            if(data === '1'){
                                parent.window.location.reload();//刷新
                                // parent.table_reload(0);//0停留在当前页，1回到第一页
                                parent.parent.layer.msg('操作成功!',{ icon: 1, time:2000 });
                                layer_close();
                            }else{
                                layer.msg('操作失败!', { icon: 2, time: 2000 });
                            }
                        },
                        error: function(data) {
                            ajax_error(data);
                        }
                    });
                }
            });
        });
    </script>
    <!--/请在上方写此页面业务相关的脚本-->
</body>

</html>
